﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.IO;

namespace PhilosophyQuiz
{
    class Category
    {
        public List<string> Categories { get; set; }

        public void LoadCategories()
        {
            string filePath = String.Format("{0}/{1}", Directory.GetCurrentDirectory(), "data.xml");
            XmlDocument xmlData = new XmlDocument();
            xmlData.Load(filePath);
            foreach (XmlNode xmlNode in xmlData.DocumentElement.ChildNodes)
            {
                Categories.Add(xmlNode.Attributes[0].InnerText);
            }
        }
    }
}
